<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\cpmjagent\controller;

/**
 * Description of IndexController
 *
 * @author SoChishun
 */
class IndexController extends AppbaseController {

    public function index() {
        $menus = [
            ['text' => '运营数据', 'ico' => 'fa-user', 'children' => [
                    ['name' => 'user.agent/agentlist', 'text' => '代理管理', 'url' => ''],
                    ['name' => 'user.gameuser/referrallist', 'text' => '我的用户', 'url' => ''],
                    ['name' => 'user.gameuser/rechargegems', 'text' => '给玩家充卡', 'url' => ''],
                    ['name' => 'finance.recharge/rechargelist', 'text' => '充值记录', 'url' => ''],
                    ['name' => 'finance.withdraw/withdraw', 'text' => '提现记录', 'url' => ''],
                    ['name' => 'finance.gemsdetail/gemsdetaillist', 'text' => '房卡交易记录', 'url' => ''],
                ]],
        ];

        if ($this->global_data['isadmin']) {
            $menus[0]['children'][] = ['name' => 'article.notices/noticeslist', 'text' => '公告管理', 'url' => ''];
        }
        $face_url = '/public/static/adminlte/img/user2-160x160.jpg';
        $loginInfo = \app\cpmjagent\model\user\AgentModel::get(['account' => $this->global_data['account']]);
        return view('', ['menus' => $menus, 'face_url' => $face_url, 'loginInfo' => $loginInfo]);
    }

}
